package com.chenyu.util;


import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class GeneratorSqlmap {
    public void generator() throws Exception{

        List<String> warnings = new ArrayList<String>();
        boolean overwrite = true;
        //指定逆向工程配置文件generatorConfig.xml
        File configFile = new File("generatorConfig.xml");
       // ConfigurationParser cp = new ConfigurationParser(warnings);
       // Configuration config = cp.parseConfiguration(configFile);
        //DefaultShellCallback callback = new DefaultShellCallback(overwrite);
        //MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config,
               // callback, warnings);
       // myBatisGenerator.generate(null);

    }
    //项目配置完成后运行main程序即可获得映射文件和持久化类
    public static void main(String[] args) throws Exception {
        try {
            GeneratorSqlmap generatorSqlmap = new GeneratorSqlmap();
            generatorSqlmap.generator();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
